<template>
	<view class="content">
		<!-- 装饰背景元素 -->
		<view class="bg-decoration-top"></view>
		<view class="bg-decoration-bottom"></view>
		<view class="bg-decoration-circle1"></view>
		<view class="bg-decoration-circle2"></view>
		
		<!-- 主内容 -->
		<view class="main-container">
			<image class="logo" src="/static/logo.png"></image>
			<view class="text-area">
				<text class="title">{{title}}</text>
			</view>
			<view class="subtitle">欢迎来到 StarMate</view>
			
			<!-- 功能入口卡片 -->
			<view class="feature-cards">
				<view class="feature-card" @click="navigate('/pages/chat/conversationList')">
					<view class="card-icon">💬</view>
					<view class="card-title">对话交流</view>
				</view>
				<view class="feature-card" @click="navigate('/pages/tasks/tasks')">
					<view class="card-icon">📝</view>
					<view class="card-title">任务管理</view>
				</view>
				<view class="feature-card" @click="navigate('/pages/family/family')">
					<view class="card-icon">👭</view>
					<view class="card-title">挚友小星</view>
				</view>
				<view class="feature-card" @click="navigate('/pages/vocab/vocab')">
					<view class="card-icon">📚</view>
					<view class="card-title">单词学习</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			navigate(path) {
				uni.navigateTo({ url: path });
			}
		}
	}
</script>

<style>
	/* 全局样式 */
	* {
		box-sizing: border-box;
	}
	
	/* 主容器 */
	.content {
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: linear-gradient(135deg, #FFF5F7 0%, #FFE6F0 100%);
		position: relative;
		overflow: hidden;
		padding: 40rpx;
	}
	
	/* 背景装饰 */
	.bg-decoration-top {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		height: 300rpx;
		background: linear-gradient(180deg, rgba(255, 182, 212, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
		z-index: 1;
	}
	
	.bg-decoration-bottom {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 300rpx;
		background: linear-gradient(0deg, rgba(255, 182, 212, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
		z-index: 1;
	}
	
	.bg-decoration-circle1 {
		position: absolute;
		top: 10%;
		left: -100rpx;
		width: 400rpx;
		height: 400rpx;
		border-radius: 50%;
		background: linear-gradient(135deg, rgba(255, 153, 204, 0.2) 0%, rgba(255, 153, 204, 0) 100%);
		z-index: 0;
		animation: floatSoft 8s ease-in-out infinite;
	}
	
	.bg-decoration-circle2 {
		position: absolute;
		bottom: 10%;
		right: -100rpx;
		width: 400rpx;
		height: 400rpx;
		border-radius: 50%;
		background: linear-gradient(135deg, rgba(255, 182, 212, 0.2) 0%, rgba(255, 182, 212, 0) 100%);
		z-index: 0;
		animation: floatSoft 10s ease-in-out infinite reverse;
	}
	
	/* 主内容容器 */
	.main-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		z-index: 2;
		width: 100%;
		max-width: 600rpx;
	}
	
	/* Logo */
	.logo {
		height: 280rpx;
		width: 280rpx;
		margin-bottom: 40rpx;
		border-radius: 48rpx;
		box-shadow: 0 20rpx 40rpx rgba(255, 153, 204, 0.2);
		animation: floatSoft 6s ease-in-out infinite;
	}
	
	/* 标题 */
	.text-area {
		margin-bottom: 20rpx;
	}
	
	.title {
		font-size: 64rpx;
		color: #FF69B4;
		font-weight: bold;
		text-shadow: 0 4rpx 8rpx rgba(255, 105, 180, 0.2);
		animation: floatSoft 4s ease-in-out infinite;
	}
	
	.subtitle {
		font-size: 36rpx;
		color: #FF85B3;
		margin-bottom: 80rpx;
		opacity: 0.9;
	}
	
	/* 功能卡片 */
	.feature-cards {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30rpx;
		width: 100%;
	}
	
	.feature-card {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 40rpx 20rpx;
		background: rgba(255, 255, 255, 0.8);
		border-radius: 32rpx;
		box-shadow: 0 10rpx 30rpx rgba(255, 153, 204, 0.2);
		transition: all 0.3s ease;
		animation: floatSoft 5s ease-in-out infinite;
		backdrop-filter: blur(10rpx);
		border: 1rpx solid rgba(255, 182, 212, 0.3);
	}
	
	.feature-card:nth-child(2n) {
		animation-delay: 0.5s;
	}
	
	.feature-card:nth-child(3n) {
		animation-delay: 1s;
	}
	
	.feature-card:nth-child(4n) {
		animation-delay: 1.5s;
	}
	
	.feature-card:active {
		transform: scale(0.95);
		box-shadow: 0 5rpx 20rpx rgba(255, 153, 204, 0.3);
	}
	
	.feature-card:hover {
		background: rgba(255, 255, 255, 0.95);
		box-shadow: 0 15rpx 40rpx rgba(255, 153, 204, 0.3);
	}
	
	.card-icon {
		font-size: 80rpx;
		margin-bottom: 20rpx;
		animation: bounceSoft 2s ease-in-out infinite;
	}
	
	.card-title {
		font-size: 32rpx;
		color: #FF69B4;
		font-weight: 600;
	}
	
	/* 动画定义 */
	@keyframes floatSoft {
		0%, 100% {
			transform: translateY(0);
		}
		50% {
			transform: translateY(-20rpx);
		}
	}
	
	@keyframes bounceSoft {
		0%, 100% {
			transform: scale(1);
		}
		50% {
			transform: scale(1.1);
		}
	}
</style>
